#ifndef QTHELPER_H
#define QTHELPER_H

#include <QObject>

class QtHelper:public QObject
{
    Q_OBJECT
public:
    QtHelper();

    //弹出框
    static int showMessageBox(const QString &text, int type = 0, int closeSec = 0, bool exec = false);
    //弹出消息框
    static void showMessageBoxInfo(const QString &text, int closeSec = 0, bool exec = false);
    //弹出错误框
    static void showMessageBoxError(const QString &text, int closeSec = 0, bool exec = false);
    //弹出询问框
    static int showMessageBoxQuestion(const QString &text);

    //Ip地址正则
    static bool isValidIPAddress(const QString &ip);
};

#endif // QTHELPER_H
